package cn.codenest.rabbitmqstreamconsumer.util.impl;
import cn.codenest.rabbitmqstreamconsumer.config.InputMessageBinding;
import cn.codenest.rabbitmqstreamconsumer.util.RbmqService;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.messaging.support.MessageBuilder;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author ：Hyman
 * @date ：Created in 2021/7/6 20:31
 * @description：
 * @modified By：
 * @version: $
 */
@Service
@EnableBinding({InputMessageBinding.class})
public class RbmqServiceImpl implements RbmqService {

    @StreamListener(InputMessageBinding.INPUT)
    @Override
    public void consume(String msg) {
        System.out.println("接受到的消息是：" + msg);
    }
}
